using SpecFlowDemo.Specs.Support.Drivers;
using System.Net.Http;
using System.Threading.Tasks;
using TechTalk.SpecFlow;

namespace SpecFlowDemo.Specs.StepDefinitions
{
    [Binding]
    public sealed class CalculatorStepDefinitions
    {
        private readonly HttpClientDriver _httpClientDriver;
        private readonly HttpClient _httpClient;

        public CalculatorStepDefinitions(HttpClientDriver httpClientDriver, IHttpClientFactory httpClientFactory)
        {
            _httpClientDriver = httpClientDriver;
            _httpClient = httpClientFactory.CreateClient();
        }

        [Given("the first number is (.*)")]
        public void GivenTheFirstNumberIs(int number)
        {
            _httpClientDriver.TestSSS = "20";
        }

        [When("the two numbers are added")]
        public async Task WhenTheTwoNumbersAreAdded()
        {
            await _httpClientDriver.Get("WeatherForecast");
        }

        [Then("the result should be (.*)")]
        public void ThenTheResultShouldBe(int result)
        {

        }

        [When(@"the two numbers test")]
        public void WhenTheTwoNumbersTest()
        {

        }

        [Then(@"the result test")]
        public void ThenTheResultTest()
        {

        }
    }
}